package route;

public class Station {
	private String stationName;
	private Location location;

	public Station(String stationName, Location location) {
		this.stationName = stationName;
		this.location = location;
	}

	public boolean passAcross(String roadName) {
		return this.location.passAcross(roadName);
	}

	@Override
	public String toString() {
		return "\n  - "+this.stationName + " : " + this.location;
	}

	@Override
	public boolean equals(Object o) {
		if (o == null || o instanceof Station)
			return false;
		else {
			return this.stationName.equals(stationName)
					&& this.location.equals(location);
		}
	}
}
